home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 6: Level 6
/
17 Bit - Level 6 (1998)(Epic Marketing)[!].iso
/
quartz
/
q0428.dms
/
q0428.adf
/
rayshade
/
AmigaDOS.c
next >
Wrap
C/C++ Source or Header
|
1992-05-12
|
851b
|
49 lines
extern long yylineno = 1;
#include <math.h>
#include <exec/types.h>
#include <libraries/dos.h>
#include <libraries/dosextens.h>
#ifdef LATTICE_50
#include <proto/dos.h>
#endif
typedef double Float;
#ifdef LATTICE_50
#ifdef MFPU
double __builtin_fpc(int, double);
#define sqrt(d) __builtin_fpc(0x0004,d)
#endif
#ifdef MFFP
#include <mffp.h>
#endif
#endif
double hypot(double a, double b)
{
return ( sqrt(a*a + b*b));
}
static struct DateStamp dsOffset;
void InitRSGCTime(void)
{
DateStamp(&dsOffset);
}
void RSGetCpuTime(usertime, systime)
Float *usertime, *systime;
{
ULONG Minutes;
struct DateStamp DS;
DateStamp(&DS);
Minutes = (DS.ds_Days - dsOffset.ds_Days)*24*60 + (DS.ds_Minute-dsOffset.ds_Minute);
*usertime = (Float)(Minutes*60L) + (Float)(DS.ds_Tick-dsOffset.ds_Tick)/(Float)TICKS_PER_SECOND;
*systime = 0.0;
}